package a.oschina.observedemo.demo3;

/**
 * &lt;功能详细描述&gt;
 *
 * @author Administrator
 * @version [版本号, 2018/10/23]
 * @see [相关类/方法]
 * @since [产品/模块版本]
 */
public class Test3 {
    public static void main(String[] args) {
        Secretary secretary = new Secretary();

        StockObserver stockObserver = new StockObserver("股票观察者", secretary);
        NBAObserver nbaObserver = new NBAObserver("NBA观察者", secretary);

        secretary.attach(stockObserver);
        secretary.attach(nbaObserver);

        secretary.setAction("老板回来了");

        secretary.notifyObserver();


    }
}
